package com.zhx.basis;

public class Finally一定执行 {

    public static void main(String[] args) {
        System.out.println( sout2());
    }

    static void sout(){
        try {
            System.out.println(1);
        }catch (Exception e){
        }finally {
            System.out.println(2);
        }
    }
    static int sout2(){
        try {
            int a=1/0;
           return 1;
        }catch (Exception e){
            return 4;
        }finally {
            return 2;
        }
    }
}
